
package ltd.letao.mall.dao;

import ltd.letao.mall.entity.LeTaoMallGoods;
import ltd.letao.mall.entity.StockNumDTO;
import ltd.letao.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface LeTaoMallGoodsMapper {
    int deleteByPrimaryKey(Long goodsId);

    int insert(LeTaoMallGoods record);

    int insertSelective(LeTaoMallGoods record);

    LeTaoMallGoods selectByPrimaryKey(Long goodsId);

    LeTaoMallGoods selectByCategoryIdAndName(@Param("goodsName") String goodsName, @Param("goodsCategoryId") Long goodsCategoryId);

    int updateByPrimaryKeySelective(LeTaoMallGoods record);

    int updateByPrimaryKeyWithBLOBs(LeTaoMallGoods record);

    int updateByPrimaryKey(LeTaoMallGoods record);

    List<LeTaoMallGoods> findLeTaoMallGoodsList(PageQueryUtil pageUtil);

    int getTotalLeTaoMallGoods(PageQueryUtil pageUtil);

    List<LeTaoMallGoods> selectByPrimaryKeys(List<Long> goodsIds);

    List<LeTaoMallGoods> findLeTaoMallGoodsListBySearch(PageQueryUtil pageUtil);

    int getTotalLeTaoMallGoodsBySearch(PageQueryUtil pageUtil);

    int batchInsert(@Param("leTaoMallGoodsList") List<LeTaoMallGoods> leTaoMallGoodsList);

    int updateStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int batchUpdateSellStatus(@Param("orderIds")Long[] orderIds,@Param("sellStatus") int sellStatus);

}